<?php

namespace common\models\credit_public_tables;

use Yii;

/**
 * This is the model class for table "{{%sl_check_1009}}".
 *
 * @property integer $id
 * @property string $c_id
 * @property string $c_card
 * @property integer $c_time
 * @property string $c_source
 * @property string $perfer_back
 * @property string $c_orderid
 * @property string $c_post
 * @property string $c_back
 */
class SlCheck1009 extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%sl_check_1009}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_public');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['c_card'], 'required'],
            [['c_time'], 'integer'],
            [['perfer_back', 'c_post', 'c_back'], 'string'],
            [['c_id'], 'string', 'max' => 30],
            [['c_card'], 'string', 'max' => 20],
            [['c_source'], 'string', 'max' => 10],
            [['c_orderid'], 'string', 'max' => 32],
            [['c_card'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'c_id' => Yii::t('app', 'C ID'),
            'c_card' => Yii::t('app', 'C Card'),
            'c_time' => Yii::t('app', 'C Time'),
            'c_source' => Yii::t('app', 'C Source'),
            'perfer_back' => Yii::t('app', 'Perfer Back'),
            'c_orderid' => Yii::t('app', 'C Orderid'),
            'c_post' => Yii::t('app', 'C Post'),
            'c_back' => Yii::t('app', 'C Back'),
        ];
    }
}
